package com.common.exception;

public enum BizCodeEnum {
    UNKNOW_EXCEPTION(10000, "系统未知异常"),
    VAILD_EXCEPTION(10001, "参数格式校验失败"),
    TO_MANY_REQUEST(10002,"请求流量过大，请稍后再试"),
    PRODUCT_EXCEPTION(11000,"商品上架错误"),
    PHONE_EXIST_EXCEPTION(15000,"手机号已存在"),
    USERNAME_EXIST_EXCEPTION(15001,"用户名已存在"),
    STOCK_EMPTY_EXCEPTION(17000,"商品库存不足"),
    USER_NOTFOUND_EXCEPTION(16000,"用户不存在或密码错误");
    private int code;
    private String msg;

    BizCodeEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

}
